Agreement Management Biz API
Retrieve Consents TMF 651 GET
This method is to retrieves consents from Salesforce
URL
https://[localhost]:[port]/tmf-api/agreementManagement/v4/{businessId}/agreement
url Param
name | type | description | required |
---|---|---|---|
businessId | string | 2 letter ISO 3166 country code (PR, BB, JM, PA, etc.) identifying the business unit. | Y |
Header
name | type | description | required |
---|---|---|---|
client_id | string | The client_id identifying the channel. | Y |
client_secret | string | Password associated with the client_id. | Y |
X-Correlation-ID | string | Identifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction. Note - Mule default behavior creates a sample x-correlation-id field if value is not passed from client, API will use this value in case value is not passed in API request | N |
Query Param
name | type | description | required |
---|---|---|---|
agreementItem.productOffering.name | string | Name of the characteristic to search. Could be different, depending on the use case. in this case "OrderId" | Y |
agreementItem.productOffering.id | string | Orderid value to which consents are retrieved | Y |
engagedParty.name | string | Name of the caller or requester. Ex: digital | Y |
engagedParty.role | string | Role of the caller. Ex: channel | Y |
cURL request
curl --location 'https://nonprod.esb.cloud.lla.com/dev/agreement-management-biz/tmf-api/agreementManagement/v4/PR/agreement?agreementItem.productOffering.name=OrderId&agreementItem.productOffering.id=801do00000KLjWVAA1&engagedParty.name=digital&engagedParty.role=channel' \
--header 'client_id: XXXXX' \
--header 'client_secret: XXXXX' \
--header 'X-Correlation-ID: 232466'
Response
[
{ //Newly added node for PaymentLink
"characteristic": [
{
"name": "paymentLink",
"value": "http://..."
}
]
},
{
"id": "MktPrefEmail",
"agreementType": "MktPrefEmail",
"name": "MktPrefEmail",
"state": "Not Consented",
"characteristic": [
{
"name": "mandatory",
"value": false
}
],
"engagedParty": [
{
"id": "23539239-23539535",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "801do00000KLjWVAA1",
"name": "orderId",
"referredType": "orderId"
}
]
},
{
"id": "MktPrefPostal",
"agreementType": "MktPrefPostal",
"name": "MktPrefPostal",
"state": "Not Consented",
"characteristic": [
{
"name": "mandatory",
"value": false
}
],
"engagedParty": [
{
"id": "23539239-23539535",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "801do00000KLjWVAA1",
"name": "orderId",
"referredType": "orderId"
}
]
},
{
"id": "MktPrefCall",
"agreementType": "MktPrefCall",
"name": "MktPrefCall",
"state": "Not Consented",
"characteristic": [
{
"name": "mandatory",
"value": false
}
],
"engagedParty": [
{
"id": "23539239-23539535",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "801do00000KLjWVAA1",
"name": "orderId",
"referredType": "orderId"
}
]
},
{
"id": "MktPrefText",
"agreementType": "MktPrefText",
"name": "MktPrefText",
"state": "Not Consented",
"characteristic": [
{
"name": "mandatory",
"value": false
}
],
"engagedParty": [
{
"id": "23539239-23539535",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "801do00000KLjWVAA1",
"name": "orderId",
"referredType": "orderId"
}
]
},
{ // New change object to Array based on SF specifications structure change
"agreementType": "InstConsent",
"name": "InstConsent",
"characteristic": [
{
"name": "InstConsent",
"valueType": "array",
"value": [
{
"id": "MSISDN 1",
"mandatory": true/false,
"state": "Not Consented",
"parameters": [
{
"name": "installmentTerm",
"value": "18 Month"
},
{
"name": "installmentOriginalAmount",
"value": 729.99
},
{
"name": "Downpayment",
"value": 100
},
{
"name": "installmentId",
"value": 881849994499944
},
{
"name": "PayMonthly",
"value": 40.55
},
{
"name": "TotalTax",
"value": 0
}
]
},
{
"id": "MSISDN 2",
"mandatory": true/false,
"state": "Not Consented",
"parameters": [
{
"name": "installmentTerm",
"value": "18 Month"
},
{
"name": "installmentOriginalAmount",
"value": 729.99
},
{
"name": "Downpayment",
"value": 100
},
{
"name": "installmentId",
"value": 881849994499944
},
{
"name": "PayMonthly",
"value": 40.55
},
{
"name": "TotalTax",
"value": 0
}
]
}
]
}
],
"engagedParty": [
{
"id": "23539239-23539535",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "801do00000KLjWVAA1",
"name": "orderId",
"referredType": "orderId"
}
]
},
{ // New change object to Array based on SF specifications structure change
"agreementType": "InsuranceConsent",
"name": "InsuranceConsent",
"characteristic": [
{
"name": "InsuranceConsent",
"valueType": "array",
"value": [
{
"id": "MSISDN 1",
"mandatory": true/false,
"state": "Not Consented"
},
{
"id": "MSISDN 2",
"mandatory": true/false,
"state": "Not Consented"
},
{
"id": "MSISDN 3",
"mandatory": true/false,
"state": "Not Consented"
}
]
}
],
"engagedParty": [
{
"id": "23539239-23539535",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "801do00000KLjWVAA1",
"name": "orderId",
"referredType": "orderId"
}
]
},
{ // New change object to Array based on SF specifications structure change
"agreementType": "TradeInConsent",
"name": "TradeInConsent",
"characteristic": [
{
"name": "TradeInConsent",
"valueType": "array",
"value": [
{
"id": "MSISDN 1",
"mandatory": true/false,
"state": "Not Consented"
}
]
}
],
"engagedParty": [
{
"id": "23539239-23539535",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "801do00000KLjWVAA1",
"name": "orderId",
"referredType": "orderId"
}
]
},
{
"id": "AutoPay",
"agreementType": "AutoPay",
"name": "AutoPay",
"state": "Not Consented",
"characteristic": [
{
"name": "paymentType",
"value": "NoneToAnyPM"
},
{
"name": "mandatory",
"value": true
}
],
"engagedParty": [
{
"id": "23539239-23539535",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "801do00000KLjWVAA1",
"name": "orderId",
"referredType": "orderId"
}
]
},
{
"id": "GeneralTnC",
"agreementType": "GeneralTnC",
"name": "GeneralTnC",
"state": "Not Consented",
"characteristic": [
{
"name": "mandatory",
"value": true
}
],
"engagedParty": [
{
"id": "23539239-23539535",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "801do00000KLjWVAA1",
"name": "orderId",
"referredType": "orderId"
}
]
},
{
"id": "BillingPrefEmail",
"agreementType": "BillingPrefEmail",
"name": "BillingPrefEmail",
"state": "Not Consented",
"characteristic": [
{
"name": "mandatory",
"value": false
}
],
"engagedParty": [
{
"id": "23539239-23539535",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "801do00000KLjWVAA1",
"name": "orderId",
"referredType": "orderId"
}
]
},
{
"id": "BillingPrefPostal",
"agreementType": "BillingPrefPostal",
"name": "BillingPrefPostal",
"state": "Not Consented",
"characteristic": [
{
"name": "mandatory",
"value": false
}
],
"engagedParty": [
{
"id": "23539239-23539535",
"name": "accountNumber",
"referredType": "accountNumber"
},
{
"id": "801do00000KLjWVAA1",
"name": "orderId",
"referredType": "orderId"
}
]
}
]
Definitions
Each of the response parameters is detailed.
name | type | description | required |
---|---|---|---|
id | string | identifier for the consent | Y |
agreementType | string | Type of the consent | Y |
name | string | Name of the consent | Y |
state | string | Consented/Non Consented | N |
characteristic | array | escribes a given characteristic of an object or entity through a name/value pair. | N |
characteristic.name | string | Name of the characteristic | N |
characteristic.value | string | Value of the characteristic | N |
engagedParty | array | Related Entity reference. | N |
engagedParty.id | string | Unique identifier of a related entity. orderId/accountNumber | N |
engagedParty.name | string | Name of the related entity. | N |
engagedParty.referredType | string | The actual type of the target instance. | N |
Possible response error
In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.
[ 400 ]
Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.
{
"errors" : [{
"code" : 400,
"message" : "The request is invalid or not properly formed.",
"description" : "Malformed request syntax, invalid request message framing, or deceptive request routing."
}]
}
[ 401 ]
Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.
{
"errors" : [{
"code" : 401,
"message" : "The user could not be authenticated for this request.",
"description" : "The request has not been applied because it lacks valid authentication credentials for the target resource"
}]
}
[ 404 ]
Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.
{
"errors" : [{
"code" : 404,
"message" : "The request is invalid or not properly formed.",
"description" : "The requested operation failed because a resource associated with the request could not be found."
}]
}
[ 405 ]
Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.
{
"errors": [{
"code": 405,
"message": "APIKIT:METHOD_NOT_ALLOWED",
"description": "HTTP Method DELETE not allowed for : /{businessId}/agreement"
}]
}
[ 500 ]
Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.
{
"errors" : [{
"code" : 500,
"message" : "Internal Server Error",
"description": "The request failed due to an internal error"
}]
}
[ 501 ]
Not implemented - indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.
{
"errors" : [{
"code" : 501,
"message" : "Not implemented",
"description" : "Operation GET /agreement for Business Id: xxxx not implemented"
}]
}